﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace ExamTests
{
    [TestClass]
    public class FileSplitterTest
    {
        [TestMethod]
        public void ConcatenateFilesTest()
        {
            FileSplitter target = new FileSplitter();
            string firstFile = @"C:\Users\Franky\Downloads\Camelot.S01E07.HDTV.XviD-ASAP\camelot.s01e07.hdtv.xvid-asap-part001.avi";
            string concatenateFile = "result.avi";
            target.ConcatenateFiles(firstFile, concatenateFile);
        }

        [TestMethod]
        [DeploymentItem("DelegatesInputAndOtherExam.dll")]
        public void GenerateNextFileNameTest()
        {
            FileSplitter_Accessor target = new FileSplitter_Accessor(); 
            string file = "pesho.avi";
            string expected = "pesho-part001.avi";
            string actual = target.GenerateNextFileName(file);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void SplitFileTest()
        {
            FileSplitter target = new FileSplitter();
            string file = @"C:\Users\Franky\Downloads\Camelot.S01E07.HDTV.XviD-ASAP\camelot.s01e07.hdtv.xvid-asap.avi";
            target.SplitFile(file);
        }
    }
}